Summary of Graph Cities Infrastructure

Directory File Structure

Detailed subfolder structures and comments refer to corresponding sections.

./
├── wave-decomposition/ #backend computation algorithms and decomposition results
│   ├── scripts/
│   ├── src/
│   └── ${DATASET}/
├── Graph_City_Web/ #main frontend visualization: Graph City web application 
│   ├── data/
│   ├── data_dags/
│   ├── data_maps/
│   ├── label-history/
│   ├── lib/
│   ├── models/
│   ├── node_modules/
│   ├── patterns/
│   ├── python/
│   ├── scripts/
│   ├── textures/
│   ├── three.js/
│   ├── fpViewer/ #soft link to ../fpViewer/
│   ├── wave-decomposition/ #soft link to ../wave-decomposition/
│   └── ${DATASET}/ #soft link to ../wave-decomposition/${DATASET}/
├── fpViewer/ #complementary frontend visualization: fpViewer
│   ├── lib/
│   ├── localLib/
│   ├── style/
│   └── wave-decomposition/ #soft link to ../wave-decomposition/
└── graph-strata/ #complementary frontend visualization: Graph Strata
    ├── bin/
    ├── data2/
    ├── doc/
    ├── lib/
    ├── public/
    ├── src/
    └── temp2/

Quick Start

Clone Graph City Infrastructure

You may clone this repo just by typing the following line in your console:

git clone https://github.com/endlesstory0428/Graph-Cities.git

This will create a Graph City work space folder Graph-Cities. We refer to this folder as “Work Space” ./.

Compile Graph City Infrastructure

Before you start creating your own Graph City, you first need to compile “Graph Cities Infrastructure”.

Compile wave-decomposition

In this version, we provide compiled binary files that one can directly use them after making them executable by the following lines.

cd wave-decomposition
chmod +x buffkcore; chmod +x cc-layers-mat; chmod +x DAGMetaNode_touch; chmod +x edgeCutCompress_touch; chmod +x entropy; chmod +x ewave_next; chmod +x fpmetagraph; chmod +x gridmap; chmod +x lccBuck; chmod +x preproc; chmod +x topSrc_touch; chmod +x waveCC_touch; chmod +x waveFragLevel_touch; chmod +x waveFragLevel_touch_bucket; chmod +x wavelayercc_direct; chmod +x wavemaps; chmod +x wavemapsWaveByWave; chmod +x filterBirdHorse; chmod +x filterGorilla;  
chmod +x scripts/freqUsed/getBuildingList; chmod +x scripts/freqUsed/mergeCCLayers; chmod +x scripts/freqUsed/getCityInfo; chmod +x scripts/freqUsed/dagBat_cpp; chmod +x scripts/freqUsed/dagBat_post_cpp; chmod +x scripts/freqUsed/numfixedpoints; chmod +x scripts/freqUsed/convert_ve; chmod +x scripts/freqUsed/getBuildingBucketFromMap_int; chmod +x scripts/freqUsed/wavemapsNames; chmod +x scripts/freqUsed/convert; chmod +x scripts/freqUsed/getMap_noWave; chmod +x scripts/freqUsed/getMapDag2-2; chmod +x scripts/freqUsed/fpmetagraphnormalize_int; 
chmod +x scripts/test/bucket2strata; chmod +x scripts/test/addDagInfo; chmod +x scripts/test/bucket2city; chmod +x scripts/test/addBuckESize; chmod +x scripts/test/checkLargeNode; chmod +x scripts/test/bucket2sample; chmod +x scripts/test/lcc-json2csv; 

Under your Work Space ‘./’, type the following commands in your console to compile .cpp files.

cd wave-decomposition
make

Under your Work Space ‘./’, type the following commands in your console to create soft links among the four sub-modules

ln -s $(pwd)/wave-decomposition $(pwd)/Graph_City_Web/
ln -s $(pwd)/wave-decomposition $(pwd)/fpViewer/
ln -s $(pwd)/fpViewer $(pwd)/Graph_City_Web/
ln -s $(pwd)/graph-strata $(pwd)/wave-decomposition/

Set Up Graph Cities Host Server

Under your Work Space ./, type the following commands in your console to configure your server address and ports.

python3 config.py -a ${server_address} -c ${graph_city_port} -s ${graph_strata_port}

Under your Work Space ./, type the following commands in your console to set up the “Graph Strata” server.

cd ./graph-strata/
mkdir data
npm ci
chmod +x run.sh
./run.sh

Under your Work Space ./, type the following commands in your console to set up the “Graph Cities” web application server.

cd ./Graph_City_Web/
ln -s $(pwd) $(pwd)/public
mkdir data_dags
npm ci
export NODE_OPTIONS="--max-old-space-size=65536"
node app_addon.js

Build Your Own Graph City

Input Graph

Input your graph into the folder ./wave-decomposition/${DATASET}/. The Graph Cities Infrastructure accepts two files as inputs:

Your directory file structure should be as follows:

./
├── wave-decomposition/
│   ├── scripts/
│   ├── src/
│   └── ${DATASET}/ #your input graph
│       ├── ${DATASET}.txt #pairs of integers separated by a tab
│       └── ${DATASET}_label.csv #header-free CSV
├── Graph_City_Web/
├── fpViewer/ 
└── graph-strata/

Process Decomposition

Under your Work Space ./, type the following commands in your console to process your input graph.

cd wave-decomposition/
make GRAPH=${DATASET} prepare

cd ../Graph_City_Web/
make GRAPH=${DATASET} retrive

Browse a Graph City

Use your web browser to access the following webpage containing your Graph City ready for exploration.

http://${server_address}:${graph_city_port}/?city=${DATASET}